import 'package:flutter/material.dart';

import 'package:get/get.dart';
import 'package:flutter_widgets_pc/resources/kq_theme_colors.dart';
import 'package:flutter_widgets_pc/theme/kq_theme_manager.dart';
import 'package:flutter_widgets_pc/widgets/steps/kq_step_line.dart';
import 'package:flutter_widgets_pc/widgets/titleBar/kq_title_bar.dart';

/// 时间轴demo
class KqStepLineDemo extends StatefulWidget {
  const KqStepLineDemo({Key? key}) : super(key: key);

  @override
  KqStepLineDemoState createState() => KqStepLineDemoState();
}

class KqStepLineDemoState extends State<KqStepLineDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: KqHeadBar(
        headTitle: '时间轴演示',
        back: () {
          Get.back();
        },
      ),
      body: ListView.builder(
        itemCount: 10,
        itemBuilder: (context, index) {
          return Padding(
            padding: EdgeInsets.symmetric(horizontal: 15),
            child: KqStepLine(
              highlightColor: KqThemeManager.getCommonConfig().mainLightColor,
              iconTopPadding: 10,
              drawTopLine: index != 0,
              isDashLine: false,
              normalColor: KqThemeColors.text59,
              contentWidget: Text('2023年5月28日 张三删除了一条数据', style: TextStyle(
                  fontSize: 20,
                  color: KqThemeColors.text26
              ),),
            ),
          );
        },
      ),
    );
  }
}
